<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<%@ page import="com.scalar.chiptrack.utils.ConfigManager"%>

<chiptrack:checkLogon sourcePage="/financeReport.do?action=yieldCostVarienceReport"/>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext(); //try { %>
<HTML>
<HEAD>
<TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>
<SCRIPT language="JavaScript" src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=chipTracContext%>/jsp/includes/scripts/functions.js"></SCRIPT>
<SCRIPT>
    var dateElement = "";
    function openCalendar(dateValue)
    {
        dateElement = dateValue;
        newWindow = window.open('<%=chipTracContext%>/jsp/includes/calendar.html','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=no,width=180,height=440,resizable=no');
        newWindow.moveTo(550,180);
        newWindow.focus();
    }
    function assignDate(passedValue)
    {
        dateElement.value=passedValue;
        window.focus();
    }
    function selectProcess()
    {
       document.finanaceReportForm.action="<%=chipTracContext%>/financeReport.do?action=yieldCostVarienceReport";
	   document.finanaceReportForm.submit();
    }
    function submitPage()
    {
        var form = document.finanaceReportForm;
        errMsg = '';
        var pa	= document.getElementById("message");
                
        if ( chkDate ( form.fromDate.value , 'From Date ' , 'Y' ) == false )
        {
              pa.innerHTML = errMsg;
              form.fromDate.focus();
              return;
        }
        if ( chkDate ( form.toDate.value , 'To Date ' , 'Y' ) == false )
        {
              pa.innerHTML = errMsg;
              form.toDate.focus();
              return;
        }
        if(form.fromDate.value!='' && form.toDate.value!='')
        {
            if (!validateDateOut(formatDateAsMMDDYYYY(form.fromDate.value),formatDateAsMMDDYYYY(form.toDate.value)))
            {
                pa.innerHTML = "To Date cannot be less than From Date";
                form.toDate.focus();
                return;
            }
        }

        form.action = "<%=chipTracContext%>/financeReport.do?action=yieldCostVarienceReportExcel";
        form.submit();
    }

</SCRIPT>
</HEAD>
    
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<!-- Top Header Start-->
<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>
<!-- Side Navigation start -->
<%@ include file="/jsp/finance/finance_reports_menu.jsp" %>
<!-- end of the side navigations -->
    <TD bgcolor="#ffffff">
    <IMG height=9 src="images/spacer.gif" width=8></TD>
    <TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
    <TD valign="top" width="100%">

    <IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
    <BR>
    <!-- from here your body starts -->
    <center><span class="NArialW">Yield Cost Variance Report</span></center>

    <html:form name="finanaceReportForm" type="com.scalar.chiptrack.finance.forms.FinanaceReportForm" action="/financeReport.do?action=yieldCostVarienceReport">

        <TABLE BORDER="0" WIDTH="100%" ALIGN=RIGHT>
            <TR><TD width="12%" >&nbsp;</TD><TD colspan="6" class='NArialL' align="left"><strong><FONT id="message" styleClass="NArialL" color='FF0000'>&nbsp;</FONT></strong></TD></TR>
            <TR>
                <TD>&nbsp;</TD>
                <TD colspan="6" align="left">
                  <chiptrack:info styleClass="NArialL" />
                  <chiptrack:errors styleClass="NArialL" />
                  <chiptrack:messages type="info" styleClass="NArialL" />&nbsp;
                </TD>
            </TR>
            <TR><TD colspan='6'><IMG src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></TD></TR>
            <TR>
                <TD WIDTH="10%">&nbsp;</TD>
                <TD WIDTH="15%" CLASS="NARIALL">Process Name:</TD>
                <TD WIDTH="20%" CLASS="NARIALL">
                    <html:select property="processType" name="finanaceReportForm" styleClass="txfield" onchange="selectProcess()">
                        <html:options collection="processList" property="value" labelProperty="label"/>
                    </html:select>
                </TD>

                <TD WIDTH="15%" CLASS="NARIALL">Vendor:</TD>
                <TD WIDTH="20%" CLASS="NARIALL">
                    <html:select property="vendorName" name="finanaceReportForm" styleClass="txfield">
                        <html:options collection="vendorList" property="label" labelProperty="label"/>
                    </html:select>
                </TD>
                <TD WIDTH="10%">&nbsp;</TD>
            </TR>
            <TR><TD colspan='6'><IMG src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></TD></TR>
             <TR>
                <TD WIDTH="10%">&nbsp;</TD>
                <TD WIDTH="15%" CLASS="NARIALL">Base Product Name:</TD>
                <TD WIDTH="20%" CLASS="NARIALL">
                    <html:select property="baseProductId" name="finanaceReportForm" styleClass="txfield">
                        <html:option value="0">All Base Products</html:option>
                        <html:options collection="baseproductList" property="value" labelProperty="label"/>
                    </html:select>
                </TD>

                <TD WIDTH="15%" CLASS="NARIALL">Product Name:</TD>
                <TD WIDTH="20%" CLASS="NARIALL">
                    <html:select property="processStepId" name="finanaceReportForm" styleClass="txfield">
                        <html:option value="0">All Products</html:option>
                        <html:options collection="partNumberList" property="value" labelProperty="label"/>
                    </html:select></TD>
                <TD WIDTH="10%">&nbsp;</TD>
            </TR>
            <TR><TD colspan='6'><IMG src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></TD></TR>
            <TR>
                <TD WIDTH="10%">&nbsp;</TD>
                <TD width="15%" class="NArialL" valign="top" nowrap="true">From Date:<font color="red">*</font></TD>
                <TD width="20%" class="NArialL" valign="top"><html:text property="fromDate" name="finanaceReportForm" styleClass="txfield" size="16" maxlength="10"/>
                    <a href="javascript:openCalendar( document.finanaceReportForm.fromDate )">
                    <img onMouseOver="window.status='Click here to select date';return true" onMouseOut="window.status='';return true" border="0" align='center'
                        src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=20 width=20></a>
                </TD>
                <TD width="15%" class="NArialL" valign="top" align = "left">&nbsp;&nbsp;To Date:<font color="red">*</font></TD>
                <TD width="20%" class="NArialL" valign="top"><html:text property="toDate" name="finanaceReportForm" styleClass="txfield" size="16" maxlength="10"/>
                    <a href="javascript:openCalendar( document.finanaceReportForm.toDate )">
                    <img onMouseOver="window.status='Click here to select date';return true" onMouseOut="window.status='';return true" border="0" align='center'
                        src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=20 width=20></a>
                </TD>
                <TD width="10%">&nbsp;</TD>
            </TR>
            <TR><TD colspan='6'><IMG src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height="30"></TD></TR>
            <TR>
                <TD COLSPAN=5 align="center">
                    <A href="javascript:submitPage();" onMouseOver="window.status='Click to Generate Yield Cost Varience Report';return true" onMouseOut="window.status='';return true" title= "Click here to Generate Yield Cost Varience Report"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/submit.gif" width="53" height="17"></A>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="javascript:document.finanaceReportForm.reset();"><img src="<%=chipTracContext%>/jsp/includes/images/reset.gif" border='0' onmouseover="window.status='Click to Reset';return true" onmouseout="window.status='';return true"title="Click here to Reset"></a>
                </TD>
            </TR>
        </TABLE>
    </html:form>
    <!-- till here -->
    <BR><BR><BR></TD>
    <TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
    </TR>
    </TABLE>
    <!-- Footer starts here -->
    <%@ include file="/jsp/includes/footer.jsp" %>
    <!-- footer end here -->
    </BODY>
</HTML>
<%--
<%
    }
    catch(Exception e )
    {
        e.printStackTrace();
    }
%>--%>
